$(document).ready(function () {
    $(".btn-admin-login").click(function () {
        console.log("aaa")
        $.ajax({
            url: "/admin/login",
            method: "POST",
            data: {
                "username": $("#username").val(),
                "password": $("#password").val()
            },
            success: function (data) {
                console.log(data);
                if (data.success == true) {
                    console.log("登陆成功");
                    window.location.href = "/admin/loginsuccess";
                } else {
                    alert(data.message);
                }
            }
        })
    })
})